<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="../js/mainJS.js"></script>
<link rel="stylesheet" type="text/css" href="../css/cssMain.css" />
<title>Главен екран на администратора</title>
</head>
<body>
<f:view>
	<h:form>
		<jsp:include page="menu/menuAdmin.jsp" />
		<rich:spacer height="10" />
		<rich:panel styleClass="header">
			<h:panelGrid columns="3">
				<h:panelGrid width="300px">
					<h:outputText style="font-size:13;font-weight: bold;"
						value="Добре дошъл #{mbAdmin.resultUser.username}" />
				</h:panelGrid>
				<rich:spacer width="425" />
				<h:panelGrid width="300px">
					<h:commandLink value="Изход" style="font-size:13"
						action="#{mbAdmin.signOut}" />
				</h:panelGrid>
			</h:panelGrid>
		</rich:panel>
		<rich:panel styleClass="messages" id="adminMessages">
			<rich:messages errorClass="errorText" infoClass="errorText" />
		</rich:panel>
		<rich:panel id="mainPanelAdmin" styleClass="mainPanelCenter">
			<h:panelGrid id="mainPanelGridAdmin" styleClass="panelCenter">
				<rich:panel id="panelTableLecturersAdmin" headerClass="textCenter"
					styleClass="mainPanelCenterBackGrForInnerPanel"
					header="Всички потребители с роля \"преподавател\"">
					<!-- Таблица с потребителите с роля преподавател -->
					<h:panelGrid styleClass="panelCenter" id="pnlAllLecturersAdmin">
						<rich:datascroller id="dataScrollerLAdmin" maxPages="15"
							fastControls="hide" for="tableAllLecturersAdmin"
							renderIfSinglePage="true">
							<f:facet name="first">
								<h:outputText value="Първа" style="margin:10px;" />
							</f:facet>
							<f:facet name="first_disabled">
								<h:outputText value="Първа" style="margin:10px;" />
							</f:facet>
							<f:facet name="last">
								<h:outputText value="Последна" style="margin:10px;" />
							</f:facet>
							<f:facet name="last_disabled">
								<h:outputText value="Последна" style="margin:10px;" />
							</f:facet>
							<f:facet name="previous">
								<h:outputText value="Предишна" style="margin:10px;" />
							</f:facet>
							<f:facet name="previous_disabled">
								<h:outputText value="Предишна" style="margin:10px;" />
							</f:facet>
							<f:facet name="next">
								<h:outputText value="Следваща" style="margin:10px;" />
							</f:facet>
							<f:facet name="next_disabled">
								<h:outputText value="Следваща" style="margin:10px;" />
							</f:facet>
						</rich:datascroller>
						<rich:spacer height="20" />
						<rich:dataTable rows="10" id="tableAllLecturersAdmin"
							binding="#{mbAdmin.lecturersDataTable}"
							value="#{mbAdmin.allLecturers}" var="allLecturers">
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Избор" />
								</f:facet>
								<h:selectOneRadio
									valueChangeListener="#{mbAdmin.setSelectedLecturer}"
									onclick="dataTableSelectOneRadio(this);">
									<f:selectItem itemValue="null" />
								</h:selectOneRadio>
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Потребителско име" />
								</f:facet>
								<h:outputText value="#{allLecturers.username}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Имена" />
								</f:facet>
								<h:outputText
									value="#{allLecturers.firstName} #{allLecturers.secondName} #{allLecturers.thirdName}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="ЕГН" />
								</f:facet>
								<h:outputText value="#{allLecturers.egn}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Титла" />
								</f:facet>
								<h:outputText value="#{allLecturers.title.name}" />
							</rich:column>
						</rich:dataTable>
					</h:panelGrid>
				</rich:panel>
				<rich:spacer height="20" />
				<rich:panel id="panelTableStudentsAdmin" headerClass="textCenter"
					styleClass="mainPanelCenterBackGrForInnerPanel"
					header="Всички потребители с роля \"студент\"">
					<h:panelGrid styleClass="panelCenter" id="panellAllHomeworksAdmin">
						<!-- Таблица с поребителите с роля студент -->
						<rich:datascroller id="scrStudents" maxPages="15"
							fastControls="hide" for="adminAllStudentAdmin"
							renderIfSinglePage="true">
							<f:facet name="first">
								<h:outputText value="Първа" style="margin:10px;" />
							</f:facet>
							<f:facet name="first_disabled">
								<h:outputText value="Първа" style="margin:10px;" />
							</f:facet>
							<f:facet name="last">
								<h:outputText value="Последна" style="margin:10px;" />
							</f:facet>
							<f:facet name="last_disabled">
								<h:outputText value="Последна" style="margin:10px;" />
							</f:facet>
							<f:facet name="previous">
								<h:outputText value="Предишна" style="margin:10px;" />
							</f:facet>
							<f:facet name="previous_disabled">
								<h:outputText value="Предишна" style="margin:10px;" />
							</f:facet>
							<f:facet name="next">
								<h:outputText value="Следваща" style="margin:10px;" />
							</f:facet>
							<f:facet name="next_disabled">
								<h:outputText value="Следваща" style="margin:10px;" />
							</f:facet>
						</rich:datascroller>
						<rich:spacer height="20" />
						<rich:dataTable rows="10" id="adminAllStudentAdmin"
							value="#{mbAdmin.allStudents}" var="allStudents"
							binding="#{mbAdmin.studentsDatatable}">
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Избор" />
								</f:facet>
								<h:selectOneRadio
									valueChangeListener="#{mbAdmin.setSelectedStudent}"
									onclick="dataTableSelectOneRadio(this);">
									<f:selectItem itemValue="null" />
								</h:selectOneRadio>
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Факултетен номер" />
								</f:facet>
								<h:outputText value="#{allStudents.fn}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Специалност" />
								</f:facet>
								<h:outputText value="#{allStudents.specialty.name}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Потребителско име" />
								</f:facet>
								<h:outputText value="#{allStudents.username}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="Имена" />
								</f:facet>
								<h:outputText
									value="#{allStudents.firstName} #{allStudents.secondName} #{allStudents.thirdName}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="ЕГН" />
								</f:facet>
								<h:outputText value="#{allStudents.egn}" />
							</rich:column>
						</rich:dataTable>
					</h:panelGrid>
				</rich:panel>
			</h:panelGrid>
		</rich:panel>
		<rich:spacer height="5" />
		<rich:panel styleClass="footerMain">
			<jsp:include page="footer/footerMain.jsp" />
		</rich:panel>
	</h:form>
	<rich:modalPanel id="mdlNewLecturer" autosized="true">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="Регистриране на нов преподавател"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="../img/close.png" id="hidelink" />
				<rich:componentControl for="mdlNewLecturer" attachTo="hidelink"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<a4j:form>
			<h:panelGrid columns="2" style="width:350px;">
				<h:outputText value="Име" />
				<h:inputText value="#{mbAdmin.newLecturer.firstName}" />
				<h:outputText value="Презиме" />
				<h:inputText value="#{mbAdmin.newLecturer.secondName}" />
				<h:outputText value="Фамилия" />
				<h:inputText value="#{mbAdmin.newLecturer.thirdName}" />
				<h:outputText value="ЕГН" />
				<h:inputText value="#{mbAdmin.newLecturer.egn}" />
				<h:outputText value="Ел. поща" />
				<h:inputText value="#{mbAdmin.newLecturer.mail}" />
				<h:outputText value="Потребителско име" />
				<h:inputText value="#{mbAdmin.newLecturer.username}" />
				<h:outputText value="Парола" />
				<h:inputText value="#{mbAdmin.newLecturer.password}" />
				<h:outputText value="Потвърди" />
				<h:inputText value="#{mbAdmin.validatePass}" />
				<h:outputText value="Степен" />
				<rich:comboBox value="#{mbAdmin.selectedLecturerTitle}"
					enableManualInput="false" defaultLabel="Избор...">
					<f:selectItems value="#{mbAdmin.nomLecturerTitles}" />
				</rich:comboBox>
			</h:panelGrid>
			<h:panelGrid columns="2">
				<h:panelGrid>
					<rich:comboBox value="#{mbAdmin.selectedLecturerSpec}"
						enableManualInput="false">
						<f:selectItems value="#{mbAdmin.nomSpecialties}" />
					</rich:comboBox>
					<rich:spacer height="15" />
					<a4j:commandButton value="Добави специалност"
						action="#{mbAdmin.addSpecToNewL}" reRender="tblLecSpecNew" />
				</h:panelGrid>
				<h:panelGrid id="tblLecSpecNew">
					<rich:dataTable value="#{mbAdmin.newLecturer.specialties}"
						binding="#{mbAdmin.newLecturerSpecialties}" id="tblSpecNew"
						var="spec">
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Избор" />
							</f:facet>
							<a4j:commandLink value="Изтрий" id="lnkDelete"
								oncomplete="Richfaces.showModalPanel('mdlEditLecturer')"
								action="#{mbAdmin.removeSpecFromSelectedL}"
								reRender="tblLecSpecNew">
							</a4j:commandLink>
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Специалност" />
							</f:facet>
							<h:outputText value="#{spec.name}" />
						</rich:column>
					</rich:dataTable>
				</h:panelGrid>
			</h:panelGrid>
			<a4j:commandButton id="btnCreateNewLecturer" value="Създай"
				action="#{mbAdmin.createNewLecturer}"
				oncomplete="Richfaces.hideModalPanel('mdlNewLecturer')"
				reRender="panelTableLecturersAdmin">
			</a4j:commandButton>
			<a4j:commandButton
				oncomplete="Richfaces.hideModalPanel('mdlNewLecturer')"
				value="Отказ" />
		</a4j:form>
	</rich:modalPanel>
	<rich:modalPanel id="mdlEditLecturer" autosized="true">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="Промяна на селектиран преподавател"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="../img/close.png" id="hidelink1" />
				<rich:componentControl for="mdlEditLecturer" attachTo="hidelink1"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<a4j:form>
			<h:panelGrid columns="2" style="width:350px;">
				<h:outputText value="Име" />
				<h:inputText value="#{mbAdmin.selectedLecturer.firstName}" />
				<h:outputText value="Презиме" />
				<h:inputText value="#{mbAdmin.selectedLecturer.secondName}" />
				<h:outputText value="Фамилия" />
				<h:inputText value="#{mbAdmin.selectedLecturer.thirdName}" />
				<h:outputText value="ЕГН" />
				<h:inputText value="#{mbAdmin.selectedLecturer.egn}" />
				<h:outputText value="Ел. поща" />
				<h:inputText value="#{mbAdmin.selectedLecturer.mail}" />
				<h:outputText value="Потребителско име" />
				<h:inputText value="#{mbAdmin.selectedLecturer.username}" />
				<h:outputText value="Парола" />
				<h:inputSecret value="#{mbAdmin.selectedLecturer.password}" />
				<h:outputText value="Потвърди" />
				<h:inputSecret value="#{mbAdmin.validatePass}" />
				<h:outputText value="Степен" />
				<rich:comboBox value="#{mbAdmin.selectedLecturerTitle}"
					enableManualInput="false">
					<f:selectItems value="#{mbAdmin.nomLecturerTitles}" />
				</rich:comboBox>
			</h:panelGrid>
			<h:panelGrid columns="2">
				<h:panelGrid>
					<rich:comboBox value="#{mbAdmin.selectedLecturerSpec}"
						enableManualInput="false">
						<f:selectItems value="#{mbAdmin.nomSpecialties}" />
					</rich:comboBox>
					<rich:spacer height="15" />
					<a4j:commandButton value="Добави специалност"
						action="#{mbAdmin.addSpecToSelectedL}" reRender="tblLecSpec" />
				</h:panelGrid>
				<h:panelGrid id="tblLecSpec">
					<rich:dataTable value="#{mbAdmin.selectedLecturer.specialties}"
						binding="#{mbAdmin.lecturerSpecialties}" id="tblSpec" var="spec">
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Избор" />
							</f:facet>
							<a4j:commandLink value="Изтрий" id="lnkDelete"
								oncomplete="Richfaces.showModalPanel('mdlEditLecturer')"
								action="#{mbAdmin.removeSpecFromSelectedL}" reRender="tblSpec">
							</a4j:commandLink>
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Специалност" />
							</f:facet>
							<h:outputText value="#{spec.name}" />
						</rich:column>
					</rich:dataTable>
				</h:panelGrid>
			</h:panelGrid>
			<h:panelGrid columns="2">
				<a4j:commandButton id="btnEditSelectedLecturer" value="Промени"
					action="#{mbAdmin.editSelectedLecturer}" type="submit"
					oncomplete="Richfaces.hideModalPanel('mdlEditLecturer')"
					reRender="panelTableLecturersAdmin">
				</a4j:commandButton>
				<a4j:commandButton value="Отказ"
					oncomplete="Richfaces.hideModalPanel('mdlEditLecturer')" />
			</h:panelGrid>
		</a4j:form>
	</rich:modalPanel>
	<rich:modalPanel id="mdlTaskForLecturer" autosized="true"
		minWidth="850">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="Качени задания от селектирания преподавател"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="../img/close.png" id="hidelink2" />
				<rich:componentControl for="mdlTaskForLecturer" attachTo="hidelink2"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<h:form>
			<h:panelGrid id="pnlTasksForlecturer">
				<h:panelGrid columns="3">
					<a4j:commandButton id="btnNewTask" value="Ново задание"
						action="#{mbAdmin.navToNewTaskForSelLecturer}">
					</a4j:commandButton>
					<a4j:commandButton value="Промени задание"
						action="#{mbAdmin.navToEditTaskForSelLecturer}" />
					<a4j:commandButton value="Изтрий задание"
						action="#{mbAdmin.deleteTask}" reRender="pnlTasksForlecturer" />
				</h:panelGrid>
				<rich:datascroller id="scrStudents" maxPages="15"
					fastControls="hide" for="allTasksForSelectedLecturer"
					renderIfSinglePage="true">
					<f:facet name="first">
						<h:outputText value="Първа" style="margin:10px;" />
					</f:facet>
					<f:facet name="first_disabled">
						<h:outputText value="Първа" style="margin:10px;" />
					</f:facet>
					<f:facet name="last">
						<h:outputText value="Последна" style="margin:10px;" />
					</f:facet>
					<f:facet name="last_disabled">
						<h:outputText value="Последна" style="margin:10px;" />
					</f:facet>
					<f:facet name="previous">
						<h:outputText value="Предишна" style="margin:10px;" />
					</f:facet>
					<f:facet name="previous_disabled">
						<h:outputText value="Предишна" style="margin:10px;" />
					</f:facet>
					<f:facet name="next">
						<h:outputText value="Следваща" style="margin:10px;" />
					</f:facet>
					<f:facet name="next_disabled">
						<h:outputText value="Следваща" style="margin:10px;" />
					</f:facet>
				</rich:datascroller>
				<rich:dataTable id="allTasksForSelectedLecturer"
					var="allTasksForLecturer" rows="5"
					value="#{mbAdmin.allTasksForLecturer}"
					binding="#{mbAdmin.bindingAllTasksForLecturers}"
					onRowMouseOver="this.className='dataTableRowMouseOver'"
					onRowMouseOut="this.className='dataTableRowMouseOut'">
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Избор" />
						</f:facet>
						<h:selectOneRadio onclick="dataTableSelectOneRadio(this);"
							valueChangeListener="#{mbAdmin.setSelectedTask}">
							<f:selectItem itemValue="null" />
						</h:selectOneRadio>
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Име на заданието" />
						</f:facet>
						<h:outputText value="#{allTasksForLecturer.title}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="За специалност/и" />
						</f:facet>
						<h:outputText value="#{allTasksForLecturer.lecturerSpecs}" />
					</rich:column>
					<rich:column width="100px;">
						<f:facet name="header">
							<h:outputText value="Дата на ъплоуд" />
						</f:facet>
						<rich:calendar value="#{allTasksForLecturer.startDate}"
							readonly="true" enableManualInput="false" inputSize="8"
							datePattern="#{mbAdmin.datePattern}" />
					</rich:column>
					<rich:column width="100px;">
						<f:facet name="header">
							<h:outputText value="Валидно до" />
						</f:facet>
						<rich:calendar value="#{allTasksForLecturer.endDate}"
							readonly="true" enableManualInput="false" inputSize="8"
							datePattern="#{mbAdmin.datePattern}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Статус" />
						</f:facet>
						<h:outputText value="#{allTasksForLecturer.status}" />
					</rich:column>
					<rich:column style="text-align:center">
						<f:facet name="header">
							<h:outputText value="Изпратени домашни" />
						</f:facet>
						<h:outputText value="#{allTasksForLecturer.totalHomework}" />
					</rich:column>
					<rich:column>
						<f:facet name="header">
							<h:outputText value="Забележка" />
						</f:facet>
						<h:outputText value="#{allTasksForLecturer.description}" />
					</rich:column>
				</rich:dataTable>
				<a4j:commandButton value="Отказ"
					oncomplete="Richfaces.hideModalPanel('mdlTaskForLecturer')" />
			</h:panelGrid>
		</h:form>
	</rich:modalPanel>
	<rich:modalPanel id="mdlEditStudent" autosized="true">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="Промяна на селектиран студент"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="../img/close.png" id="hidelink3" />
				<rich:componentControl for="mdlEditStudent" attachTo="hidelink3"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<a4j:form>
			<h:panelGrid columns="2" style="width:350px;">
				<h:outputText value="Име" />
				<h:inputText value="#{mbAdmin.selectedStudent.firstName}" />
				<h:outputText value="Презиме" />
				<h:inputText value="#{mbAdmin.selectedStudent.secondName}" />
				<h:outputText value="Фамилия" />
				<h:inputText value="#{mbAdmin.selectedStudent.thirdName}" />
				<h:outputText value="ЕГН" />
				<h:inputText value="#{mbAdmin.selectedStudent.egn}" />
				<h:outputText value="Факултетен номер" />
				<h:inputText value="#{mbAdmin.selectedStudent.fn}" />
				<h:outputText value="Ел. поща" />
				<h:inputText value="#{mbAdmin.selectedStudent.mail}" />
				<h:outputText value="Потребителско име" />
				<h:inputText value="#{mbAdmin.selectedStudent.username}" />
				<h:outputText value="Парола" />
				<h:inputSecret value="#{mbAdmin.selectedStudent.password}" />
				<h:outputText value="Потвърди" />
				<h:inputSecret value="#{mbAdmin.validatePass}" />
				<h:outputText value="Специалност" />
				<rich:comboBox value="#{mbAdmin.selectedStudent.specialty.name}"
					enableManualInput="false">
					<f:selectItems value="#{mbAdmin.nomSpecialties}" />
				</rich:comboBox>
				<h:outputText value="Форма на обучение" />
				<rich:comboBox value="#{mbAdmin.selectedStudent.degree.name}"
					enableManualInput="false">
					<f:selectItems value="#{mbAdmin.nomStudentDegrees}" />
				</rich:comboBox>
			</h:panelGrid>
			<h:panelGrid columns="2">
				<a4j:commandButton value="Промени"
					oncomplete="Richfaces.hideModalPanel('mdlEditStudent')"
					action="#{mbAdmin.editSelectedStudent}"
					reRender="panellAllHomeworksAdmin" />
				<a4j:commandButton value="Отказ"
					oncomplete="Richfaces.hideModalPanel('mdlEditStudent')" />
			</h:panelGrid>
		</a4j:form>
	</rich:modalPanel>
	<rich:modalPanel id="mdlHomeworkSent" autosized="true">
		<f:facet name="header">
			<h:panelGroup>
				<h:outputText value="Изпратени домашни"></h:outputText>
			</h:panelGroup>
		</f:facet>
		<f:facet name="controls">
			<h:panelGroup>
				<h:graphicImage value="../img/close.png" id="hidelink4" />
				<rich:componentControl for="mdlHomeworkSent" attachTo="hidelink4"
					operation="hide" event="onclick" />
			</h:panelGroup>
		</f:facet>
		<a4j:form>
			<h:panelGrid>
				<h:panelGroup>
					<h:commandButton value="Виж/Свали съдържанието"
						action="#{mbAdmin.downloadHomework}" />
					<rich:spacer width="10" />
					<a4j:commandButton action="#{mbAdmin.rateHomework}"
						reRender="tableGrid" value="Оцени домашно" />
				</h:panelGroup>
				<h:panelGrid id="tableGrid">
					<rich:datascroller id="scrStudents" maxPages="15"
						fastControls="hide" for="allHomeworkForStudent"
						renderIfSinglePage="true">
						<f:facet name="first">
							<h:outputText value="Първа" style="margin:10px;" />
						</f:facet>
						<f:facet name="first_disabled">
							<h:outputText value="Първа" style="margin:10px;" />
						</f:facet>
						<f:facet name="last">
							<h:outputText value="Последна" style="margin:10px;" />
						</f:facet>
						<f:facet name="last_disabled">
							<h:outputText value="Последна" style="margin:10px;" />
						</f:facet>
						<f:facet name="previous">
							<h:outputText value="Предишна" style="margin:10px;" />
						</f:facet>
						<f:facet name="previous_disabled">
							<h:outputText value="Предишна" style="margin:10px;" />
						</f:facet>
						<f:facet name="next">
							<h:outputText value="Следваща" style="margin:10px;" />
						</f:facet>
						<f:facet name="next_disabled">
							<h:outputText value="Следваща" style="margin:10px;" />
						</f:facet>
					</rich:datascroller>
					<rich:dataTable id="allHomeworkForStudent"
						binding="#{mbAdmin.bindingAllHomeworkForStudents}"
						value="#{mbAdmin.allHomeworkForStudent}"
						var="allHomeworkForStudent">
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Избор" />
							</f:facet>
							<h:selectOneRadio onclick="dataTableSelectOneRadio(this);"
								valueChangeListener="#{mbAdmin.setSelectedHomework}">
								<f:selectItem itemValue="null" />
							</h:selectOneRadio>
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="По задание" />
							</f:facet>
							<h:outputText value="#{allHomeworkForStudent.task.title}" />
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="До преподавател" />
							</f:facet>
							<h:outputText
								value="#{allHomeworkForStudent.task.lecturer.firstName} #{allHomeworkForStudent.task.lecturer.thirdName}" />
						</rich:column>
						<rich:column width="100px">
							<f:facet name="header">
								<h:outputText value="Дата на изпращане" />
							</f:facet>
							<rich:calendar value="#{allHomeworkForStudent.sentDate}"
								readonly="true" enableManualInput="false" inputSize="8"
								datePattern="#{mbAdmin.datePattern}" />
						</rich:column>
						<rich:column>
							<f:facet name="header">
								<h:outputText value="Прикачен файл" />
							</f:facet>
							<h:outputText value="#{allHomeworkForStudent.fileName}"
								rendered="#{allHomeworkForStudent.fileName != null}" />
							<h:outputText value="Липсва файл"
								rendered="#{allHomeworkForStudent.fileName == null}" />
						</rich:column>
						<rich:column width="15px">
							<f:facet name="header">
								<h:outputText value="Оценка" />
							</f:facet>
							<h:inputText size="5" value="#{allHomeworkForStudent.rating}"
								style="text-align:center" />
						</rich:column>
					</rich:dataTable>
				</h:panelGrid>
				<rich:messages errorClass="errorText" infoClass="errorText" />
				<a4j:commandButton value="Отказ"
					oncomplete="Richfaces.hideModalPanel('mdlHomeworkSent')" />
			</h:panelGrid>
		</a4j:form>
	</rich:modalPanel>
</f:view>
</body>
</html>